home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
l
/
lightwave3dv3.5a.dms
/
lightwave3dv3.5a.adf
/
lw1.lha
/
arexx_examples
/
lwm
/
Center.lwm
< prev
next >
Wrap
Text File
|
1993-06-09
|
752b
|
31 lines
/* CMD: Center
* Center Object by Bounding Box */
/* By Arnie Cachelin © 1992 NewTek Inc. */
libadd = addlib("LWModelerARexx.port",0)
signal on error
signal on syntax
box=boundingbox() /* Should check out empty list ... */
parse var box n x1 x2 y1 y2 z1 z2
say box
cx=-(x2+x1)/2
cy=-(y2+y1)/2
cz=-(z2+z1)/2
/* Uncomment this stuff to get center info and a chance to avoid the move
s1='@'x1 y1 z1
s2='@'x2 y2 z2
s3='@'abs(cx) abs(cy) abs(cz)
if notify(2,'@Bounding Box:',s1,s2,'@Center position:',s3,'!Center Object?') then
*/
call MOVE(cx cy cz)
if (libadd) then call remlib("LWModelerARexx.port")
exit
syntax:
error:
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
if (libadd) then call remlib("LWModelerARexx.port")
exit